package com.ruoyi.system.service.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.enums.SelectName;
import com.ruoyi.common.enums.UserStatus;
import com.ruoyi.system.domain.PsnDocVo;
import com.ruoyi.system.domain.ResponseParam;
import com.ruoyi.system.mapper.SelectBoxMapper;
import com.ruoyi.system.service.SelectBoxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SelectBoxServiceImpl implements SelectBoxService {

    @Autowired
    private SelectBoxMapper selectBoxMapper;

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<ResponseParam> getApplicationType() {
        return selectBoxMapper.getBillType(SelectName.APPLICATIONTYPE.getInfo());
    }

//    @Override
//    @DataSource(value = DataSourceType.YONGYOU)
//    public List<ResponseParam> getSection() {
//        return selectBoxMapper.getSection();
//    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<ResponseParam> getSurvey() {
        return selectBoxMapper.getTypeByName(SelectName.GETSURVEY.getInfo());
    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<ResponseParam> getProjectPhase() {
        return selectBoxMapper.getTypeByName(SelectName.GETPROJECTPHASE.getInfo());
    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<ResponseParam> getSpecialPurchase() {
        return selectBoxMapper.getTypeByName(SelectName.GETSPECIALPURCHASE.getInfo());
    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<ResponseParam> getProductStats() {
        return selectBoxMapper.getTypeByName(SelectName.GETPRODUCTSTATS.getInfo());
    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<ResponseParam> getRecheck() {
        return selectBoxMapper.getTypeByName(SelectName.GETRECHECK.getInfo());
    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<PsnDocVo> getApplicant() {
        return selectBoxMapper.getApplicant();
    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<ResponseParam> getPkOrg() {
        return selectBoxMapper.getPkOrg();
    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<ResponseParam> getIcSapplyApplicant() {
        return selectBoxMapper.getBillType(SelectName.ICSAALP.getInfo());
    }


    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public String getOrgStockorgV(String pkOrg) {
        return selectBoxMapper.getOrgStockorgV(pkOrg);
    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public String getDeptV(String pkOrg) {
        return selectBoxMapper.getDeptV(pkOrg);
    }

    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<ResponseParam> getIcSapplyType() {
        return selectBoxMapper.getTypeByName(SelectName.ICSAALPTYPE.getInfo());
    }
}
